// shopMallPackage/pages/orderReturnList/orderReturnList.js
import {
    queryOrderList,
} from "../../../service/jb_order_service"
const app = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        realStatus:-3,
        page:1,
        orderList:[],
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },
    
  

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    getMyOrderList() {
        wx.showLoading();
        queryOrderList(this.data.realStatus, this.data.page).then(res => {
          console.log("JJLog:售后订单列表===:" + JSON.stringify(res));
          wx.hideLoading();
          if (res.code == 200) {
            this.setData({
                orderList: res.data.list || []
            })
          }
        }).catch(err => {
          wx.hideLoading();
          wx.showToast({
            title: err || "查询失败",
            icon: "none"
          })
          console.error("JJLog:queryOrderList", err);
        })
      },

     //查看详情：
    seeOrderDetail(e){
      let orderId = e.currentTarget.dataset.orderId;
      //可以在这边直接操作的
      wx.navigateTo({
        url: '/featurePackage/pages/orderDetail/orderDetail?orderId=' + orderId + "&isReturn=1",
      })
    },



})